<template>
  <div class="main-container">
    <div class="header">
      <!-- <button @click="changeTheme()">切换主题</button> -->
    </div>
    <div class="content">
      <div class="col">
        <div class="row">
          <div class="scale" @click="scale('hot')">《》</div>
          <hot></hot>
        </div>
        <div class="row">
          <div class="scale" @click="scale('trend')">《》</div>
          <trend></trend>
        </div>
      </div>
      <div class="col">
        <div class="row">
          <div class="scale" @click="scale('map')">《》</div>
          <mymap></mymap>
        </div>
        <div class="row">
          <stock></stock>
        </div>
      </div>
      <div class="col">
        <div class="row">
          <rank></rank>
        </div>
        <div class="row">
          <seller></seller>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import hot from "../components/hot.vue";
import rank from "../components/rank.vue";
import seller from "../components/seller.vue";
import stock from "../components/stock.vue";
import trend from "../components/trend.vue";
import mymap from "../components/map.vue";
export default {
  components: {
    hot,
    rank,
    seller,
    stock,
    trend,
    mymap,
  },
  methods: {
    changeTheme() {
      this.$curTheme = !this.$curTheme;
      console.log(this.$curTheme);
      this.$forceUpdate();
    },
    scale(p) {
      this.$router.push("/show/" + p);
    },
  },
};
</script>

<style lang="less" scoped>
.main-container {
  width: 100%;
  height: 100%;
  .header {
    height: 4%;
    // background-color: rgba(56, 66, 92, 0.9);
    border-bottom: 1px solid rgba(56, 66, 92, 0.5);
    box-sizing: border-box;
  }
  .content {
    height: 96%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    .col {
      width: 27%;
      // background-color: #161522;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      .row {
        width: 100%;
        height: 45%;
        position: relative;
        // background-color: hotpink;
        .scale {
          position: absolute;
          color: rgba(102, 118, 160, 0.8);
          z-index: 1000;
          right: 5px;
          top: 5px;
          cursor: pointer;
        }
        :hover {
          color: whitesmoke;
        }
      }
      &:nth-child(2) {
        flex-grow: 1;
        margin: 0 20px;
      }
    }
  }
}
</style>